In recent years, the media industry has expanded its horizons beyond traditional analog technologies. Numerous systems have been developed for transmitting video information digitally from one location to be viewed at another location. One difficulty associated with providing video data in digital format is the performance-degrading overhead incurred when a media server sends packetized audio/video data to an end-player or user. Some of the main sources of overhead associated with a media server transmitting packetized audio/video data are (1) copying data from the user space buffer to the kernel buffer and (2) context switching from user level to kernel level.
The overhead involved in such transmissions may be even greater when one or more proxy servers are involved. A proxy server is an application that serves as a firewall by breaking the connection between the sender and the receiver of data. Data, which is received on one port, is forwarded on a different port, thus avoiding a straight path between two networks and preventing a hacker from obtaining internal addresses and details about a private network. Proxy servers are generally just one part of an overall firewall strategy to prevent intruders from stealing information or damaging an internal network.
FIG. 1 depicts the streaming of data from on-demand files to an end-player. Three videos (V1, V2, V3) reside on disk D1, where each video is associated with a respective video file. Video V1 has file F1, Video V2 has file F2, and Video V3 has file F3. The files F1, F2, F3 contain data (A, B, C, D, E, F, G) that will eventually be transmitted in packets. Server 140 is divided into a user level and an OS level.
The files F1, F2, and F3 are transmitted from Disk D1 to the Proxy 141, which resides in the user level of Server 140. Upon receiving the files, Proxy 141 divides the files F1, F2, and F3 into packets. For the sake of brevity, FIG. 1 only depicts F1 being divided into packets. File F1 is divided into packets A′, B′, and C′. A′, B′, and C′ are packets that contain the data represented by A, B, and C respectively.
Each layer of a network is associated with a protocol. Each protocol requires data to be packaged in a certain manner. The process of packaging data for the protocols used at the lower levels of the network is referred to as traversing down the network protocol stack. Conversely, the process of un-packaging data that is packaged at lower levels so that the data may be used at higher levels is referred to as traversing up the network protocol stack.
During the transmission process, the packets A′, B′, and C′ are copied from User Buffer 142 to Kernel Buffer 144. Then packets A′, B′ and C′ traverse down the protocol stack 143. Eventually the packets are transmitted over the network to an End Player 150 where the End Player 150 receives the packets. The packets then traverse up the protocol stack 151. FIG. 1 illustrates overhead both from copying data from the user space buffer to the kernel buffer and from context switching from user level to kernel level.
FIG. 3 is similar to FIG. 1 except that FIG. 3 involves use of a proxy server 310. In FIG. 3, live content from an Origin Server 300 is sent to server 310. Server 310 includes a proxy 311 that modifies the header of a packet from the <IP address, Port number> pair of Server 310 to the <IP address, Port number> pair of User 320. The Origin Server 300 is broadcasting live. Origin Server 300 sends out packets to a Proxy 311 that resides on Server 310. For simplicity, the description will deal with only one packet called packet A. Origin Server 300 transmits packet A to the Proxy 311 using the <IP address, Port number> pair, which is designated with the letter P. Packet A is received on Server 310 at layer 1 of the OSI model and traverses up the protocol stack 312 from the OS level to the user level. Once packet A is in the Proxy 311, which resides in the user level of Server 310, packet header of A is modified so that the <IP address, Port number> pair designated by P is modified to the <IP address, Port number> pair P1. Packet A′ represents the modified packet A. P1 is used for transmitting the packet A′ from Server 310 to user 320. FIG. 3 illustrates overhead both from copying data from the user space buffer to the kernel buffer and from context switching from user level to kernel level
FIG. 5 is similar to FIG. 3 except that FIG. 5 involves sending the same live content to multiple users. FIG. 5 depicts three users, user 520, user 530, and user 540, that will be receiving the live content from Origin Server 500.
In order to accomplish the goal of transmitting the same live content to multiple users, the Proxy 511, which resides at the user level of server 510, performs two tasks with regards to packet A once packet A arrives at Proxy 511. First, Proxy 511 replicates packet A so that there is a copy of packet A for each user that is interested in receiving the live data represented by packet A. Therefore, packet A is replicated into A1, A2, and A3. Second, the headers of packets A1, A2, and A3 are modified to contain new <IP address, Port number> pairs, which are used to transmit the replicated packets to the multiple users (520, 530, 540). The letter P represents the original <IP address, Port number> pair, which was used when packet A was transmitted by Origin Server 500 to Server 510. P1, P2, P3 represent the new <IP address, Port number> pairs. In other words P is changed to P1 in packet A1, P2 in packet A2, and P3 in packet A3.
In performing the modification of the packet headers, table 512 is used which maps P to P1, P2, and P3. For example, since P1 is used for transmitting A1 to User 520, A1's header will be modified to have P1. Likewise, since P2 is used for transmitting A2 to User 530 and P3 is used for transmitting A3 to user 540, A2's header will be modified to have P2 and A3's header will be modified to have P3.
After the replication of packet A and the modification of the headers of the replicated packets (A1, A2, A3), these replicated packets are transmitted to Users 520, 530, and 540. In transmitting the replicated packets, the replicated packets will traverse down the protocol stack 513 and are eventually sent out over the network to users 520, 530, 540. Since the headers of packets A1, A2, and A3 designate <IP addresses, Port number> pairs that correspond to the intended users, packet A1 will arrive at user 520, A2 will arrive at user 530, and A3 will arrive at user 540. FIG. 5 illustrates overhead both from copying data from the user space buffer to the kernel buffer and from context switching from user level to kernel level.
As with the scenario depicted in FIG. 1, the scenarios depicted in FIGS. 3 and 5 also involve copying data from the user buffer to the kernel buffer. However, aspects involved in copying data from user buffer to kernel buffer were left out of FIGS. 3 and 5 for the sake of brevity.
The three scenarios illustrated in FIGS. 1, 3 and 5 involve the two sources of overhead described above. Specifically, each packet is moved from user level to OS level by a user-level application making a call to an OS level routine, thereby causing one context switch per packet. Furthermore, when a proxy server is involved, transmitting the packets involves traversing up and down the protocol stack at the proxy server, in addition to the traversal down the stack that takes place at the origin server, and the traversal up the stack that takes place at the recipient. Based on the foregoing, it is desirable to provide techniques that reduce the overhead associated with transmitting data.